	<!-- Header -->
	<include file="Common/header" />
	
	<div class="main-container">
		
		<!-- Network -->
		<div class="network">
			<div class="network-banner"></div>
			
			<div class="network_con wrapper clearfix">
				<div class="menu">
					<div class="menu_btn"><img src="/assets/images/menu_btn.png"><span>网点</span></div>
				    <ul>
				      <li class="current" href="#a"><a>按条件查询</a></li>
				      <li><a href="#b">按全国地图查询</a></li>
				    </ul>
				</div>
				  
				<div class="list">
					<div class="network_area clearfix">
						<section id="a">
							<p class="title">按条件查询</p>
							<img class="line" src="/assets/images/product/zi_line.png" />
							<div class="select-list">
								<div class="select-frame province">
								<select class="dl_province" name='dl_province'>
									<option value="" disabled selected>请选择省</option>
									<PHP>$province = M('province')->field('provinceName,provinceId')->select();</PHP>
									<volist name="province" id="provinceitem">
										<option value="{$provinceitem.provinceid}">{$provinceitem.provincename}</option>
									</volist>
								</select>
								</div>
								<div class="select-frame city">
								<select class="dl_city" name='dl_city'>
									<option value="" disabled selected>市</option>
								</select>
								</div>
								<a class="a-select">查询</a>
							</div>
						</section>
						
						<section id="b">
							<p class="title">按全国地图查询</p>
							<img class="line" src="/assets/images/product/zi_line.png" />
							<div class="map">
								<div class="map-desc" style="display: none;">
									<div style="margin-top:10px;font-size:14px;padding:10px;height: 100px;" id='shoplist'>
									</div>
									<div id="shopltem"></div>				
								</div>

								<div class="map-area">
									<img class="xj" data-name="新疆" provinceid="001031" src="/assets/images/network/map/xj.png" />
									<img class="xz" data-name="西藏" provinceid="001026" src="/assets/images/network/map/xz.png" />
									<img class="gs" data-name="甘肃" provinceid="001028" src="/assets/images/network/map/gs.png" />
									<img class="qh" data-name="青海" provinceid="001029" src="/assets/images/network/map/qh.png" />
									<img class="nmg" data-name="内蒙古" provinceid="001005" src="/assets/images/network/map/nmg.png" />
									<img class="hlj" data-name="黑龙江" provinceid="001006" src="/assets/images/network/map/hlj.png" />
									<img class="jl" data-name="吉林" provinceid="001007" src="/assets/images/network/map/jl.png" />
									<img class="ln" data-name="辽宁" provinceid="001006" src="/assets/images/network/map/ln.png" />
									<img class="hb" data-name="河北" provinceid="001003" src="/assets/images/network/map/hb.png" />
									<img class="bj" data-name="北京" provinceid="001001" src="/assets/images/network/map/bj.png" />
									<img class="tj" data-name="天津"  provinceid="001002" src="/assets/images/network/map/tj.png" />
									<img class="sd" data-name="山东" provinceid="001015" src="/assets/images/network/map/sd.png" />
									<img class="sx" data-name="山西" provinceid="001004" src="/assets/images/network/map/sx.png" />
									<img class="sanx" data-name="陕西" provinceid="001027" src="/assets/images/network/map/sanx.png" />
									<img class="nx" data-name="宁夏"  provinceid="001030"src="/assets/images/network/map/nx.png" />
									<img class="sc" data-name="西川" provinceid="001023" src="/assets/images/network/map/sc.png" />
									<img class="yn" data-name="云南" provinceid="001025" src="/assets/images/network/map/yn.png" />
									<img class="cq" data-name="重庆" provinceid="001022" src="/assets/images/network/map/cq.png" />
									<img class="hn" data-name="河南" provinceid="001016" src="/assets/images/network/map/hn.png" />
									<img class="hub" data-name="湖北" provinceid="001017" src="/assets/images/network/map/hub.png" />
									<img class="ah" data-name="安徽" provinceid="001012" src="/assets/images/network/map/ah.png" />
									<img class="js" data-name="江苏" provinceid="001010" src="/assets/images/network/map/js.png" />
									<img class="guiz" data-name="贵州" provinceid="001024" src="/assets/images/network/map/guiz.png" />
									<img class="hun" data-name="湖南" provinceid="001018" src="/assets/images/network/map/hun.png" />
									<img class="jx" data-name="江西" provinceid="001014" src="/assets/images/network/map/jx.png" />
									<img class="zj" data-name="浙江" provinceid="001011" src="/assets/images/network/map/zj.png" />
									<img class="gx" data-name="广西" provinceid="001020" src="/assets/images/network/map/gx.png" />
									<img class="gd" data-name="广东" provinceid="001019" src="/assets/images/network/map/gd.png" />
									<img class="fj" data-name="福建" provinceid="001013" src="/assets/images/network/map/fj.png" />
									<img class="hain" data-name="海南" provinceid="001021" src="/assets/images/network/map/hain.png" />
									<img class="tw" data-name="台湾" provinceid="001034" src="/assets/images/network/map/tw.png" />
								</div>
							</div>
						</section>
						
						
					</div>
				</div>
			</div>
			
		</div>
		
	</div>
	
	
	
	
	<!-- Footer -->
	<include file="Common/footer" />
		
	<!-- Javascript -->
	<script src="/assets/js/jquery.SuperSlide.2.1.1.js"></script>
	<script src="/assets/js/jquery.slides.js"></script>
	<script src="/assets/js/main.js"></script>
	
	
	<script type="text/javascript">
	$('.dl_province').change(function(){
		var url = "<?php echo U('Home/Index/getCity'); ?>";
		var province_id = $('.dl_province').val();
	
		var data = {
		  	province_id : province_id,
		}
		$.get(url,data,function(msg){
		  	$('.dl_city').html(msg);
		  	
		})

	})

	$(function(){
		
		$(".network .map .map-area img").on({
			"click":function(){
				var provinceid = $(this).attr("provinceid");
				var url = "<?php echo U('Home/Index/getshops'); ?>";
				var data = {
					province_id : provinceid,
				}

				$.get(url,data,function(msg){
					if(msg == '-1'){
						$(".map-desc").show();
						$("#shopltem").hide();
						$("#shoplist").html('暂无网点信息！');

					}else{
						$(".map-desc").show();
						$("#shopltem").hide();
						$("#shoplist").html(msg);
					}
				})
			},
			"mouseenter":function(){
				var src = $(this).attr("src");
				if(src.match('_g.png')){
					src = src.substr(0,src.length-6)+".png";
				}else{
					src = src.substr(0,src.length-4)+"_g.png";
				}
				$(this).attr("src",src);
			},
			"mouseleave":function(){
				var src = $(this).attr("src");
				if(src.match('_g.png')){
					src = src.substr(0,src.length-6)+".png";
				}else{
					src = src.substr(0,src.length-4)+"_g.png";
				}
				
				$(this).attr("src",src);
			}
		})
		
		$('#imgclose').click(function(){


		//$('#imgclose').on('click',function(){
			alert(1);
			$("#shopltem").hide();
			$("#shoplist").show();
		})


	
	})
	$(".a-select").click(function(){
		var province_id = $('.dl_province').val();
		if(!province_id){
			alert('请选择城市');
			return;
		}
		var city_id = $('.dl_city').val();
		var url = "<?php echo U('Home/Index/getshops'); ?>";	
		var data = {
			province_id : province_id,
		  	city_id : city_id,
		}
		$.get(url,data,function(msg){
			$(".map-desc").show();
			$("#shoplist").html(msg);
			$('#imgclose').click(function(){
				$("#shopltem").hide();
				$("#shoplist").show();
			})
		})
	})

	




</script>
<script>
	function getshop(id) {
		var url = "<?php echo U('Home/Index/getshop'); ?>";
		var data = {
		  	id : id,
		}
		$.get(url,data,function(msg){
			$("#shoplist").hide();
			$("#shopltem").show();
			$("#shopltem").html(msg);
			$('#imgclose').click(function(){
				$("#shopltem").hide();
				$("#shoplist").show();
			})	
		})
		return false;
	}
	

</script>




</body>
</html>
